package com.example.controller;

import com.example.service.CollectionService;
import com.example.utils.Result;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin
@RestController
@RequestMapping("/collection")
@Api(tags = "收藏")
public class CollectionController {
    @Autowired
    private CollectionService collectionService;

    @GetMapping("/count3")
    public Result count3(){
        int count = collectionService.count3();
        return new Result<>("200", "调用成功", count);
    }

    @GetMapping("/count4")
    public Result count4(){
        int count = collectionService.count4();
        return new Result<>("200", "调用成功", count);
    }
}
